<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../commons/commons.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<base href="<%=basePath%>">
	
	<title></title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	</head>
	<body class="easyui-layout">   
	    <div data-options="region:'north',title:'',split:true" style="height:100px;background-size:1532px 70px;">
	    	<a href="users/userExit.html" style="float: right;margin:18px 10px 0px 0px" class="easyui-linkbutton" data-options="iconCls:'icon-back'">安全退出</a>
	    	<a href="javascript:void(0)" style="float: right;margin:18px 10px 0px 0px" class="easyui-linkbutton">当前用户:${sessionScope.user.username }</a>
	    </div>
	    <div data-options="region:'south',title:'本站不提供任何视听上传服务，所有内容均来自分享站点所提供的公开引用资源。Copyright © 1996-2017 Sea. 保留所有权利',split:true" style="height:10px;"></div>   
	    <div data-options="region:'west',title:'业务列表',split:true" style="width:200px;">
	    	<div class="easyui-accordion" fit=true>   
			    <div title="权限菜单" style="overflow:auto;padding:10px;">   
			    	<ul id="tree" class="easyui-tree" url="menu/findMenuList"></ul> 
			    </div>
			</div>
	    </div>   
	    <div data-options="region:'center',title:'业务信息'" style="padding:5px;background:#eee;">
	    	<div id="_tab" class="easyui-tabs" fit=true>   
			    <div title="首页" style="display:none;;background-size:1400px 550px;" fit=true>
			    	<div>
			    		<span></span>
			    	</div>
			    </div>
			</div>
	    </div>   
	</body>
	<script type="text/javascript">
		$(function(){
			$('#tree').tree({
				//点击节点触发事件
				onClick: function(node){
					//判断节点是否为子节点 为子节点则添加选项卡
					var flag = $("#tree").tree('isLeaf',node.target);
					if(flag){
						//判断选项卡是否存在
						var _flag = $("#_tab").tabs('exists',node.text);
						if(_flag){
							//存在则选择该选项卡
							$("#_tab").tabs('select',node.text);
						}else {
							//不存在则添加选项卡
							$("#_tab").tabs('add',{
								title:node.text,
								href:node.url,
								closable:true
							});
						}
					}
				}
			});
			/* $('#_tab').tabs('onSelect'{
				
			}); */
		});
	</script>
</html>
